public class Test {
    public static String main1(String s) {
        boolean[] arr = new boolean[127];
        StringBuilder stringBuilder = new StringBuilder();
        for(int i = 0;i<s.length();i++){
            char ch = s.charAt(i);
            if(arr[ch]==false){
                StringBuilder.append(ch);
                arr[ch] =true;
            }


        }

       return stringBuilder.toString();
    }

    public static void main2(int[] A,int m,int[] B,int n) {
        int i = m -1;
        int j = n-1;
        int k = m+n-1;
        while(i>=0&&j>=0){
            if(A[i]<B[j]){
                A[k--]=B[j--];

            }else{
                A[k--] = A[i--];
            }
        }
        while(i>=0){
            A[k--] = A[i--];
        }
        while(j>=0){
            A[k--] = B[j--];
        }
    }
}
